use super::{gather::do_gather, json, Plc, RNull, SvCache, ST_DOING, ST_WAIT};

pub async fn scan_timer(plc: Plc, real: SvCache, st_id: String) -> RNull {
    real.insert(st_id.clone(), json!(ST_DOING)).await;

    let ret = do_gather(&plc, &real, true).await;

    real.insert(st_id.clone(), json!(ST_WAIT)).await;

    ret
}
